<template>
  <el-form-item v-show="show" label="当前进度">
    <el-slider
      v-model="optionModel.pos"
      size="small"
      :min="optionModel.minrange || 0"
      :max="optionModel.maxrange || 100"
      :step="1"
      show-input
    />
  </el-form-item>
</template>

<script>
export default {
  name: 'PosEditor',
  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object
  },
  computed: {
    show() {
      if (this.selectedWidget && this.selectedWidget.type === 'progress') {
        return false
      }

      if (this.selectedWidget && this.selectedWidget.type === 'slider') {
        return false
      }
      return true
    }
  }
}
</script>

<style scoped></style>
